//
//  CoinBIP44.swift
//  XHWalletUtils
//
//  Created by xinph on 2020/5/20.
//  Copyright © 2020 xinph. All rights reserved.
//

import Foundation

public struct CoinBIP44 {
    public static let defaultBTCPath = "m/44'/0'/0'/0"
    public static let defaultETHPath = "m/44'/60'/0'/0"

    enum Coin {
        case btc
        case eth
        
        /// 币种类型 BIP44 https://github.com/satoshilabs/slips/blob/master/slip-0044.md
        func coinType() -> UInt64 {
            switch self {
            case .btc: return 0
            case .eth: return 64
            }
        }
    }
    let coin: Coin
    
    init(_ coin: Coin) {
        self.coin = coin
    }
}
